package com.sky.mapper;

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author yangLiHua
 * @version 1.0
 * @DATE 2023-11-16 16:13:18
 */
@Mapper
public interface DishFlavorMapper {
    void insertFlavor(List<DishFlavor> flavors);

    // 通过菜品id查询关联的菜品口味
    List<DishFlavor> getByDishId(Long id);

    // 通过菜品id删除菜品关联的菜品风味
    void deleteByDishId(Long id);

    // 通过拿到的ids集合批量删除菜品口味
    void deleteByDishIds(List<Long> dishIds);

    // 根据菜品id拿到风味数据
    List<DishFlavor> getFlavorByDishId(Long dishId);
}
